<?php js_validate();?>
<form name="form-validated" id="form-validated" method="post" action="<?php echo $own_links;?>save" class="input">
	<table class="table-form">
		<?php if(isset($data) && count($data) > 0){
				foreach($data as $v){
		?>
		<tr valign="top">
			<td><?php echo $v->config_label;?></td>
			<td>
				<?php
					if($v->config_obj == 'select'){
						echo "<select id='$v->config_name' name='$v->config_name' class='validate[required]'>";
						echo "<option value=''> - pilih $v->config_label - </option>";
						foreach(explode(",",$v->config_obj_value) as $vobj){
							if(trim($vobj) != ''){
								$s =($vobj==$v->config_value)?"selected=selected":"";
								echo "<option value='$vobj' $s>$vobj</option>";
							}
						}
						echo "</select>";
					}elseif($v->config_obj == 'textarea'){
						echo "<textarea cols='35'  class='validate[required]' rows='3' id='$v->config_name' name='$v->config_name'>$v->config_value</textarea>";
					}elseif($v->config_obj == 'tinymce'){
						echo "<textarea cols='35' class='validate[required]' rows='3' id='$v->config_name' name='$v->config_name'>$v->config_value</textarea>";
					}else{
						echo "<input type='text' class='validate[required]' size='30' id='$v->config_name' name='$v->config_name' value='$v->config_value' />";
					}
				?>
			</td>
		</tr>
		
		<?php 
				}
				?>
			<tr>
				<td><input type="reset" value="reset" class="btnsimpan"  /></td>
				<td><input type="submit" value="simpan" name="submit" class="btnsimpan" style="float:right;" /></td>
			</tr>
				<?php
		}else{echo "<center>- Tidak ada konfigurasi -</center>";} ?>
	</table>
</form>